package com.jvm.类加载机制;

import java.lang.reflect.Method;

public class MyTest1 {

    public static void main(String[] args) throws Exception {
        MyClassLoaderCustom myClassLoaderParentFirst = new MyClassLoaderCustom(Thread.currentThread().getContextClassLoader().getParent());
        Class testAClass = myClassLoaderParentFirst.loadClass("com.jvm.类加载机制.TestA");
        Method mainMethodA = testAClass.getDeclaredMethod("main", String[].class);
        mainMethodA.invoke(null, new Object[]{args});
    }
}